package com.ll.domain.shop.convert;

import com.ll.app.api.req.AddGoodsReqDTO;
import com.ll.dal.po.GoodsPO;
import com.ll.domain.shop.dto.GoodsDTO;
import org.springframework.beans.BeanUtils;

public class GoodsConvert {


    public static GoodsDTO PO2DTO(GoodsPO po) {
        GoodsDTO dto = new GoodsDTO();
        BeanUtils.copyProperties(po, dto);
        return dto;
    }

    public static GoodsPO addGoodsReqDTO2PO(AddGoodsReqDTO dto){
        GoodsPO po = new GoodsPO();
        BeanUtils.copyProperties(dto, po);
        return po;
    }
}
